package com.ly.mpayment.persist.entity;

// default package

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * MatchingStrategy entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="matchingstrategy"

)

public class MatchingStrategy  implements java.io.Serializable {


    // Fields

     private String matchinguuid;
     private User downUser;
     private UpShopProduct remark;
     private User upUser;

     private String provinceuuid;
     private String operatoruid;
     private String cityName;
     private String busuuid;
     private String downprouuid;
     private String status;
     private Integer orderSort;

//     private List<IncludesProduct> includesProducts;


    // Constructors

    /** default constructor */
    public MatchingStrategy() {
    }


    public MatchingStrategy(String matchinguuid, User downUser, UpShopProduct remark, User upUser) {
        this.matchinguuid = matchinguuid;
        this.downUser = downUser;
        this.remark = remark;
        this.upUser = upUser;
    }

    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="matchinguuid", unique=true, nullable=false, length=40)

    public String getMatchinguuid() {
        return this.matchinguuid;
    }

    public void setMatchinguuid(String matchinguuid) {
        this.matchinguuid = matchinguuid;
    }

    //@Column(name="remark", length=1000)

    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="remark")
    public UpShopProduct getRemark() {
        return this.remark;
    }

    public void setRemark(UpShopProduct remark) {
        this.remark = remark;
    }


    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="downuuid")
    public User getDownUser() {
        return downUser;
    }

    public void setDownUser(User downUser) {
        this.downUser = downUser;
    }


    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="upuuid")
    public User getUpUser() {
        return upUser;
    }

    public void setUpUser(User upUser) {
        this.upUser = upUser;
    }
//    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="matchingStrategy")
//
//    public List<IncludesProduct> getIncludesProducts() {
//        return this.includesProducts;
//    }
//
//    public void setIncludesProducts(List<IncludesProduct> includesProducts) {
//        this.includesProducts = includesProducts;
//    }


    @Column(name="provinceuuid")
    public String getProvinceuuid() {
        return provinceuuid;
    }

    public void setProvinceuuid(String provinceuuid) {
        this.provinceuuid = provinceuuid;
    }

    @Column(name="operatoruid")
    public String getOperatoruid() {
        return operatoruid;
    }

    public void setOperatoruid(String operatoruid) {
        this.operatoruid = operatoruid;
    }

    @Column(name="city_name")
    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    @Column(name="busuuid")
    public String getBusuuid() {
        return busuuid;
    }

    public void setBusuuid(String busuuid) {
        this.busuuid = busuuid;
    }

    @Column(name="downprouuid")
    public String getDownprouuid() {
        return downprouuid;
    }

    public void setDownprouuid(String downprouuid) {
        this.downprouuid = downprouuid;
    }

    @Column(name="status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name="order_sort")
    public Integer getOrderSort() {
        return orderSort;
    }

    public void setOrderSort(Integer orderSort) {
        this.orderSort = orderSort;
    }
}
